Repository navigation
Conversation
… from templates, or use External Secrets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
templates/secrets.yamlalways renders<fullname>-secretsfrom values (internalServiceAuth.token,egressGrant.secret,executionManifest.privateKey, and the Redis and MinIO credentials).Anyone who keeps values in Git, or renders the chart with
helm templatefor CI tooling, ends up committing those secrets or patching the rendered output.This adds an
existingSecretvalue, empty by default. When it's set:secrets.yamlrenders nothing.Every
secretKeyRefpoints at the given Secret, through a newcodeapi.secretNamehelper.The
executionManifest.privateKeycheck is skipped, as the key lives in the Secret.If
executionManifest.publicKeyis empty, sandbox-runner readsSANDBOX_EXECUTION_MANIFEST_PUBLIC_KEYfrom the Secret'scodeapi-execution-manifest-public-keykey.The public key isn't secret, but it seemed cleaner to keep both halves of the key together in the Secret, but setting
executionManifest.publicKeystill takes precedence.The bundled Redis already supports
redis.auth.existingSecret, so this adds feature parity to the parent chart.Also I added a new "Using an existing Secret" section in the README.
Testing
I checked that we remain backwards compatible for people who don't need this feature:
Without
existingSecret, the rendered output is byte-for-byte identical tomainforvalues-local.yaml, for the defaults with a keypair set, and for external Redis with S3 and IRSA and afullnameOverride.With
existingSecret=my-secret, no Secret is rendered by this chart (only the MinIO subchart's own), all 15secretKeyRefs point atmy-secret, and sandbox-runner reads the public key from it.With
executionManifest.publicKeyalso set, the literal value is used.Without
existingSecretor the keypair, the install still fails with the existing error messages.helm lintpasses.